package ${classPath};

import lombok.Getter;
import lombok.ToString;

@Getter
@ToString
public class ${domain}AlreadyExistException extends RecordAlreadyExistException {
  private static final long serialVersionUID = 1L;
  
  <#list fieldList as field>
  /** ${field.comment} */
  private ${field.type} ${field.name};
  <#if field_has_next>
  
  </#if>
  </#list>

  public ${domain}AlreadyExistException(//
    <#list fieldList as field>
    ${field.type} ${field.name}<#if field_has_next>,</#if>//${field.comment}
    </#list>
  ) {
    super("对应的${classComment}记录已经存在");

    <#list fieldList as field>
    this.${field.name} = ${field.name};
    </#list>
  }

}
